﻿using DapperExtensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RightControl.Model {

     [Table("product_img")]
    public class ProductImage:Entity {

        public int ProductId { get; set; }

        public String ImgUrl { get; set; }

        public int ImgType { get; set; }

        public int Sort { get; set; }
         
        public ProductImage(int prodId, string imgUrl, int imgType, int userId, int sort) {
            ProductId = prodId;
            ImgUrl = imgUrl;
            ImgType = imgType;
            Sort = sort;
            CreateBy = userId;
            CreateOn = DateTime.Now;
        }

        public ProductImage(int productId) {
            ProductId = productId;
        }


        public ProductImage(int id, int sort) {
            Id = id;
            Sort = sort;
        }


        public ProductImage() {

        }

    }
}
